<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script>
	function A()
	{
			this.abc =12;
	}
	
	A.prototype.show = function()
	{
			 alert(this.abc);
	};
	
	//inherit
	function B()
	{
			A.call(this);
	}
	
	B.prototype = A.prototype;
	
	B.prototype.fn = function()
	{
		alert('abc');
	};
	
var objA = new A();
var objB = new B();
	
objA.fn();
</script>
</head>

<body>
</body>
</html>
